home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / MPI_Pack.z / MPI_Pack
Encoding:
Text File  |  2002-10-03  |  3.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMPPPPIIII____PPPPAAAACCCCKKKK((((3333))))                                                        MMMMPPPPIIII____PPPPAAAACCCCKKKK((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MMMMPPPPIIII____PPPPaaaacccckkkk - Packs a data type into contiguous memory
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      C:
  13.  
  14.           #include <mpi.h>
  15.  
  16.           int MPI_Pack ( _i_n_b_u_f, _i_n_c_o_u_n_t, _t_y_p_e, _o_u_t_b_u_f,
  17.           _o_u_t_c_o_u_n_t, _p_o_s_i_t_i_o_n, _c_o_m_m )
  18.           void         *_i_n_b_u_f;
  19.           int           _i_n_c_o_u_n_t;
  20.           MPI_Datatype  _t_y_p_e;
  21.           void         *_o_u_t_b_u_f;
  22.           int           _o_u_t_c_o_u_n_t;
  23.           int          *_p_o_s_i_t_i_o_n;
  24.           MPI_Comm      _c_o_m_m;
  25.  
  26.  
  27.      C++:
  28.  
  29.           #include <mpi.h>
  30.  
  31.           void Datatype::Pack(
  32.           const void*       _i_n_b_u_f,
  33.           int               _i_n_c_o_u_n_t,
  34.           void              *_o_u_t_b_u_f,
  35.           int               _o_u_t_s_i_z_e,
  36.           int&              _p_o_s_i_t_i_o_n,
  37.           const Comm        &_c_o_m_m) const
  38.  
  39.  
  40.      Fortran:
  41.  
  42.           INCLUDE "mpif.h" (or USE MPI)
  43.  
  44.           <type> INBUF(*), OUTBUF(*)
  45.           INTEGER _i_n_c_o_u_n_t, _d_a_t_a_t_y_p_e, _o_u_t_s_i_z_e, _p_o_s_i_t_i_o_n, _c_o_m_m, _i_e_r_r_o_r
  46.  
  47.           CALL MPI_PACK(_i_n_b_u_f, _i_n_c_o_u_n_t, _d_a_t_a_t_y_p_e, *_o_u_t_b_u_f, _o_u_t_s_i_z_e, _p_o_s_i_t_i_o_n, _c_o_m_m, _i_e_r_r_o_r)
  48.  
  49.  
  50. SSSSTTTTAAAANNNNDDDDAAAARRRRDDDDSSSS
  51.      This release implements the MPI 1.2 standard, as documented by the MPI
  52.      Forum in the spring 1997 release of _M_P_I:  _A _M_e_s_s_a_g_e _P_a_s_s_i_n_g _I_n_t_e_r_f_a_c_e
  53.      _S_t_a_n_d_a_r_d.
  54.  
  55. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  56.      The MMMMPPPPIIII____PPPPaaaacccckkkk routine packs a data type into contiguous memory.  This
  57.      routine accepts the following parameters;
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMPPPPIIII____PPPPAAAACCCCKKKK((((3333))))                                                        MMMMPPPPIIII____PPPPAAAACCCCKKKK((((3333))))
  71.  
  72.  
  73.  
  74.      _i_n_b_u_f     Specifies the input buffer start (choice)
  75.  
  76.      _i_n_c_o_u_n_t   Specifies the number of input data items (integer)
  77.  
  78.      _t_y_p_e      Specifies the data type of each input data item (handle)
  79.  
  80.      _o_u_t_c_o_u_n_t  Specifies the output buffer size in bytes (integer)
  81.  
  82.      _p_o_s_i_t_i_o_n  Specifies the current position in the buffer in bytes (integer)
  83.  
  84.      _c_o_m_m      Specifies the communicator for the packed message (handle)
  85.  
  86.      _o_u_t_b_u_f    Returns the output buffer start (choice)
  87.  
  88.      _i_e_r_r_o_r    Specifies the return code value for successful completion,
  89.                which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the mmmmppppiiiiffff....hhhh
  90.                file.
  91.  
  92. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  93.      MMMMPPPPIIII____PPPPaaaacccckkkk____ssssiiiizzzzeeee(3), MMMMPPPPIIII____UUUUnnnnppppaaaacccckkkk(3)
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.